package com.larry.resend.hp;

import java.util.ArrayList;
import java.util.List;

import com.pegatron.ers.server.app.helper.ContextHelper;
import com.pegatron.ers.vo.common.CommonDataModel;

public class T03Processor extends HpCommonProcessor {

	public T03Processor() {
		super("ShipService", "submitExpressShip", "com.pegatron.ers.server.app.message.edi.hp.HpEdiT03Sender", "com.pegatron.ers.jms.edi.hp.executor.HpEdiT03MessageConsumer");
	}

	@Override
	public void process(String key) throws Exception {
		super.serviceOrderId = key;
		this.sendMessage();
	}

	@Override
	public void initData() {

	}

	@Override
	public void prepareParams() throws Exception {
		initParams = new ArrayList<Object>();
		initParams.add(rmaSite);
		initParams.add("SHIP");
		List<CommonDataModel> infos = ContextHelper.getHpEdiService().getCsoInfo(null, null, serviceOrderId, rmaSite);
		initParams.add(infos.get(0).getBigDecimal("order_no"));
		initParams.add(infos.get(0).getBigDecimal("item_no"));
		String entryNo = "SYSADMIN";
		initParams.add(entryNo);
		initParams.add("");
		initParams.add("");
	}
}
